package com.ebupt.migu.music.effectStatistics.enums;

import lombok.Getter;

@Getter
public enum SendChannel {
    SendChannel_1("1", "音乐APP"),
    SendChannel_2("2", "融媒APP");

    private final String name;
    private final String code;

    SendChannel(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getNameByCode(String code) {
        for (SendChannel value : SendChannel.values()) {
            if (value.getCode().equals(code)) {
                return value.getName();
            }
        }
        return null;
    }

}
